







[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
ReadOnlyCollectionBase is a base class that can be used to more easily implement the
generic ICollection<T> and non-generic ICollection interfaces for a read-only collection:
a collection that does not allow adding or removing elements.
Namespace: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
[SerializableAttribute] public abstract class ReadOnlyCollectionBase<T> : ICollection<T>, IEnumerable<T>, ICollection, IEnumerable |
Visual Basic (Declaration) |
---|
<SerializableAttribute> _ Public MustInherit Class ReadOnlyCollectionBase(Of T) _ Implements ICollection(Of T), IEnumerable(Of T), _ ICollection, IEnumerable |
Visual C++ |
---|
[SerializableAttribute] generic<typename T> public ref class ReadOnlyCollectionBase abstract : ICollection<T>, IEnumerable<T>, ICollection, IEnumerable |
Type Parameters
- T
- The item type of the collection.
Remarks
To use ReadOnlyCollectionBase as a base class, the derived class must override the Count and GetEnumerator methods.
ICollection<T>.Contains need not be implemented by the derived class, but it should be strongly considered, because the ReadOnlyCollectionBase implementation may not be very efficient.
Inheritance Hierarchy
System..::Object
Wintellect.PowerCollections..::ReadOnlyCollectionBase<(Of <T>)>
Wintellect.PowerCollections..::ReadOnlyListBase<(Of <T>)>
Wintellect.PowerCollections..::ReadOnlyDictionaryBase<(Of <TKey, TValue>)>
Wintellect.PowerCollections..::ReadOnlyMultiDictionaryBase<(Of <TKey, TValue>)>
Wintellect.PowerCollections..::ReadOnlyCollectionBase<(Of <T>)>
Wintellect.PowerCollections..::ReadOnlyListBase<(Of <T>)>
Wintellect.PowerCollections..::ReadOnlyDictionaryBase<(Of <TKey, TValue>)>
Wintellect.PowerCollections..::ReadOnlyMultiDictionaryBase<(Of <TKey, TValue>)>
See Also
ReadOnlyCollectionBase<(Of <T>)> Members
Wintellect.PowerCollections Namespace